package com.cn.proxy;

import java.lang.reflect.Proxy;

public class Test02 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Person p = new Student();
		Person studentproxy = (Person) Proxy.newProxyInstance(Test02.class.getClassLoader(), Student.class.getInterfaces(), new MyInvocationHandler(p));
		studentproxy.eat();
	}

}
